/*
 * DRACOON API
 * REST Web Services for DRACOON<br><br>This page provides an overview of all available and documented DRACOON APIs, which are grouped by tags.<br>Each tag provides a collection of APIs that are intended for a specific area of the DRACOON.<br><br><a title='Developer Information' href='https://developer.dracoon.com'>Developer Information</a>&emsp;&emsp;<a title='Get SDKs on GitHub' href='https://github.com/dracoon'>Get SDKs on GitHub</a><br><br><a title='Terms of service' href='https://www.dracoon.com/terms/general-terms-and-conditions/'>Terms of service</a>
 *
 * OpenAPI spec version: 4.45.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package ch.cyberduck.core.sds.io.swagger.client.model;

import java.util.Objects;
import java.util.Arrays;
import ch.cyberduck.core.sds.io.swagger.client.model.FileKey;
import ch.cyberduck.core.sds.io.swagger.client.model.ObjectExpiration;
import ch.cyberduck.core.sds.io.swagger.client.model.UserKeyPairContainer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
/**
 * Request model for creating a Download Share
 */
@Schema(description = "Request model for creating a Download Share")

public class CreateDownloadShareRequest {
  @JsonProperty("nodeId")
  private Long nodeId = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("password")
  private String password = null;

  @JsonProperty("expiration")
  private ObjectExpiration expiration = null;

  @JsonProperty("notes")
  private String notes = null;

  @JsonProperty("internalNotes")
  private String internalNotes = null;

  @JsonProperty("showCreatorName")
  private Boolean showCreatorName = false;

  @JsonProperty("showCreatorUsername")
  private Boolean showCreatorUsername = false;

  @JsonProperty("maxDownloads")
  private Integer maxDownloads = null;

  @JsonProperty("keyPair")
  private UserKeyPairContainer keyPair = null;

  @JsonProperty("fileKey")
  private FileKey fileKey = null;

  @JsonProperty("receiverLanguage")
  private String receiverLanguage = null;

  @JsonProperty("textMessageRecipients")
  private List<String> textMessageRecipients = null;

  @JsonProperty("notifyCreator")
  private Boolean notifyCreator = false;

  @JsonProperty("creatorLanguage")
  private String creatorLanguage = null;

  @JsonProperty("sendMail")
  private Boolean sendMail = false;

  @JsonProperty("mailRecipients")
  private String mailRecipients = null;

  @JsonProperty("mailSubject")
  private String mailSubject = null;

  @JsonProperty("mailBody")
  private String mailBody = null;

  @JsonProperty("sendSms")
  private Boolean sendSms = false;

  @JsonProperty("smsRecipients")
  private String smsRecipients = null;

  public CreateDownloadShareRequest nodeId(Long nodeId) {
    this.nodeId = nodeId;
    return this;
  }

   /**
   * Source node ID
   * @return nodeId
  **/
  @Schema(required = true, description = "Source node ID")
  public Long getNodeId() {
    return nodeId;
  }

  public void setNodeId(Long nodeId) {
    this.nodeId = nodeId;
  }

  public CreateDownloadShareRequest name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Alias name  (default: name of the shared node)
   * @return name
  **/
  @Schema(description = "Alias name  (default: name of the shared node)")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public CreateDownloadShareRequest password(String password) {
    this.password = password;
    return this;
  }

   /**
   * Access password, not allowed for encrypted shares
   * @return password
  **/
  @Schema(description = "Access password, not allowed for encrypted shares")
  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public CreateDownloadShareRequest expiration(ObjectExpiration expiration) {
    this.expiration = expiration;
    return this;
  }

   /**
   * Get expiration
   * @return expiration
  **/
  @Schema(description = "")
  public ObjectExpiration getExpiration() {
    return expiration;
  }

  public void setExpiration(ObjectExpiration expiration) {
    this.expiration = expiration;
  }

  public CreateDownloadShareRequest notes(String notes) {
    this.notes = notes;
    return this;
  }

   /**
   * User notes
   * @return notes
  **/
  @Schema(description = "User notes")
  public String getNotes() {
    return notes;
  }

  public void setNotes(String notes) {
    this.notes = notes;
  }

  public CreateDownloadShareRequest internalNotes(String internalNotes) {
    this.internalNotes = internalNotes;
    return this;
  }

   /**
   * &amp;#128640; Since v4.11.0  Internal notes
   * @return internalNotes
  **/
  @Schema(description = "&#128640; Since v4.11.0  Internal notes")
  public String getInternalNotes() {
    return internalNotes;
  }

  public void setInternalNotes(String internalNotes) {
    this.internalNotes = internalNotes;
  }

  public CreateDownloadShareRequest showCreatorName(Boolean showCreatorName) {
    this.showCreatorName = showCreatorName;
    return this;
  }

   /**
   * Show creator first and last name.
   * @return showCreatorName
  **/
  @Schema(description = "Show creator first and last name.")
  public Boolean isShowCreatorName() {
    return showCreatorName;
  }

  public void setShowCreatorName(Boolean showCreatorName) {
    this.showCreatorName = showCreatorName;
  }

  public CreateDownloadShareRequest showCreatorUsername(Boolean showCreatorUsername) {
    this.showCreatorUsername = showCreatorUsername;
    return this;
  }

   /**
   * Show creator email address.
   * @return showCreatorUsername
  **/
  @Schema(description = "Show creator email address.")
  public Boolean isShowCreatorUsername() {
    return showCreatorUsername;
  }

  public void setShowCreatorUsername(Boolean showCreatorUsername) {
    this.showCreatorUsername = showCreatorUsername;
  }

  public CreateDownloadShareRequest maxDownloads(Integer maxDownloads) {
    this.maxDownloads = maxDownloads;
    return this;
  }

   /**
   * Max allowed downloads
   * @return maxDownloads
  **/
  @Schema(description = "Max allowed downloads")
  public Integer getMaxDownloads() {
    return maxDownloads;
  }

  public void setMaxDownloads(Integer maxDownloads) {
    this.maxDownloads = maxDownloads;
  }

  public CreateDownloadShareRequest keyPair(UserKeyPairContainer keyPair) {
    this.keyPair = keyPair;
    return this;
  }

   /**
   * Get keyPair
   * @return keyPair
  **/
  @Schema(description = "")
  public UserKeyPairContainer getKeyPair() {
    return keyPair;
  }

  public void setKeyPair(UserKeyPairContainer keyPair) {
    this.keyPair = keyPair;
  }

  public CreateDownloadShareRequest fileKey(FileKey fileKey) {
    this.fileKey = fileKey;
    return this;
  }

   /**
   * Get fileKey
   * @return fileKey
  **/
  @Schema(description = "")
  public FileKey getFileKey() {
    return fileKey;
  }

  public void setFileKey(FileKey fileKey) {
    this.fileKey = fileKey;
  }

  public CreateDownloadShareRequest receiverLanguage(String receiverLanguage) {
    this.receiverLanguage = receiverLanguage;
    return this;
  }

   /**
   * Language tag for messages to receiver
   * @return receiverLanguage
  **/
  @Schema(description = "Language tag for messages to receiver")
  public String getReceiverLanguage() {
    return receiverLanguage;
  }

  public void setReceiverLanguage(String receiverLanguage) {
    this.receiverLanguage = receiverLanguage;
  }

  public CreateDownloadShareRequest textMessageRecipients(List<String> textMessageRecipients) {
    this.textMessageRecipients = textMessageRecipients;
    return this;
  }

  public CreateDownloadShareRequest addTextMessageRecipientsItem(String textMessageRecipientsItem) {
    if (this.textMessageRecipients == null) {
      this.textMessageRecipients = new ArrayList<>();
    }
    this.textMessageRecipients.add(textMessageRecipientsItem);
    return this;
  }

   /**
   * &amp;#128640; Since v4.11.0  List of recipient FQTNs  E.123 / E.164 Format
   * @return textMessageRecipients
  **/
  @Schema(description = "&#128640; Since v4.11.0  List of recipient FQTNs  E.123 / E.164 Format")
  public List<String> getTextMessageRecipients() {
    return textMessageRecipients;
  }

  public void setTextMessageRecipients(List<String> textMessageRecipients) {
    this.textMessageRecipients = textMessageRecipients;
  }

  public CreateDownloadShareRequest notifyCreator(Boolean notifyCreator) {
    this.notifyCreator = notifyCreator;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.20.0  Notify creator on every download.
   * @return notifyCreator
  **/
  @Schema(description = "&#128679; Deprecated since v4.20.0  Notify creator on every download.")
  public Boolean isNotifyCreator() {
    return notifyCreator;
  }

  public void setNotifyCreator(Boolean notifyCreator) {
    this.notifyCreator = notifyCreator;
  }

  public CreateDownloadShareRequest creatorLanguage(String creatorLanguage) {
    this.creatorLanguage = creatorLanguage;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.20.0  Language tag for messages to creator
   * @return creatorLanguage
  **/
  @Schema(description = "&#128679; Deprecated since v4.20.0  Language tag for messages to creator")
  public String getCreatorLanguage() {
    return creatorLanguage;
  }

  public void setCreatorLanguage(String creatorLanguage) {
    this.creatorLanguage = creatorLanguage;
  }

  public CreateDownloadShareRequest sendMail(Boolean sendMail) {
    this.sendMail = sendMail;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  Notify recipients via email  Please use &#x60;POST /shares/downloads/{share_id}/email&#x60; API instead.
   * @return sendMail
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  Notify recipients via email  Please use `POST /shares/downloads/{share_id}/email` API instead.")
  public Boolean isSendMail() {
    return sendMail;
  }

  public void setSendMail(Boolean sendMail) {
    this.sendMail = sendMail;
  }

  public CreateDownloadShareRequest mailRecipients(String mailRecipients) {
    this.mailRecipients = mailRecipients;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  CSV string of recipient email addresses
   * @return mailRecipients
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  CSV string of recipient email addresses")
  public String getMailRecipients() {
    return mailRecipients;
  }

  public void setMailRecipients(String mailRecipients) {
    this.mailRecipients = mailRecipients;
  }

  public CreateDownloadShareRequest mailSubject(String mailSubject) {
    this.mailSubject = mailSubject;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  Notification email subject
   * @return mailSubject
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  Notification email subject")
  public String getMailSubject() {
    return mailSubject;
  }

  public void setMailSubject(String mailSubject) {
    this.mailSubject = mailSubject;
  }

  public CreateDownloadShareRequest mailBody(String mailBody) {
    this.mailBody = mailBody;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  Notification email content
   * @return mailBody
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  Notification email content")
  public String getMailBody() {
    return mailBody;
  }

  public void setMailBody(String mailBody) {
    this.mailBody = mailBody;
  }

  public CreateDownloadShareRequest sendSms(Boolean sendSms) {
    this.sendSms = sendSms;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  Send share password via SMS  Please use &#x60;textMessageRecipients&#x60; attribute instead.
   * @return sendSms
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  Send share password via SMS  Please use `textMessageRecipients` attribute instead.")
  public Boolean isSendSms() {
    return sendSms;
  }

  public void setSendSms(Boolean sendSms) {
    this.sendSms = sendSms;
  }

  public CreateDownloadShareRequest smsRecipients(String smsRecipients) {
    this.smsRecipients = smsRecipients;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  CSV string of recipient MSISDNs
   * @return smsRecipients
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  CSV string of recipient MSISDNs")
  public String getSmsRecipients() {
    return smsRecipients;
  }

  public void setSmsRecipients(String smsRecipients) {
    this.smsRecipients = smsRecipients;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateDownloadShareRequest createDownloadShareRequest = (CreateDownloadShareRequest) o;
    return Objects.equals(this.nodeId, createDownloadShareRequest.nodeId) &&
        Objects.equals(this.name, createDownloadShareRequest.name) &&
        Objects.equals(this.password, createDownloadShareRequest.password) &&
        Objects.equals(this.expiration, createDownloadShareRequest.expiration) &&
        Objects.equals(this.notes, createDownloadShareRequest.notes) &&
        Objects.equals(this.internalNotes, createDownloadShareRequest.internalNotes) &&
        Objects.equals(this.showCreatorName, createDownloadShareRequest.showCreatorName) &&
        Objects.equals(this.showCreatorUsername, createDownloadShareRequest.showCreatorUsername) &&
        Objects.equals(this.maxDownloads, createDownloadShareRequest.maxDownloads) &&
        Objects.equals(this.keyPair, createDownloadShareRequest.keyPair) &&
        Objects.equals(this.fileKey, createDownloadShareRequest.fileKey) &&
        Objects.equals(this.receiverLanguage, createDownloadShareRequest.receiverLanguage) &&
        Objects.equals(this.textMessageRecipients, createDownloadShareRequest.textMessageRecipients) &&
        Objects.equals(this.notifyCreator, createDownloadShareRequest.notifyCreator) &&
        Objects.equals(this.creatorLanguage, createDownloadShareRequest.creatorLanguage) &&
        Objects.equals(this.sendMail, createDownloadShareRequest.sendMail) &&
        Objects.equals(this.mailRecipients, createDownloadShareRequest.mailRecipients) &&
        Objects.equals(this.mailSubject, createDownloadShareRequest.mailSubject) &&
        Objects.equals(this.mailBody, createDownloadShareRequest.mailBody) &&
        Objects.equals(this.sendSms, createDownloadShareRequest.sendSms) &&
        Objects.equals(this.smsRecipients, createDownloadShareRequest.smsRecipients);
  }

  @Override
  public int hashCode() {
    return Objects.hash(nodeId, name, password, expiration, notes, internalNotes, showCreatorName, showCreatorUsername, maxDownloads, keyPair, fileKey, receiverLanguage, textMessageRecipients, notifyCreator, creatorLanguage, sendMail, mailRecipients, mailSubject, mailBody, sendSms, smsRecipients);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateDownloadShareRequest {\n");
    
    sb.append("    nodeId: ").append(toIndentedString(nodeId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    expiration: ").append(toIndentedString(expiration)).append("\n");
    sb.append("    notes: ").append(toIndentedString(notes)).append("\n");
    sb.append("    internalNotes: ").append(toIndentedString(internalNotes)).append("\n");
    sb.append("    showCreatorName: ").append(toIndentedString(showCreatorName)).append("\n");
    sb.append("    showCreatorUsername: ").append(toIndentedString(showCreatorUsername)).append("\n");
    sb.append("    maxDownloads: ").append(toIndentedString(maxDownloads)).append("\n");
    sb.append("    keyPair: ").append(toIndentedString(keyPair)).append("\n");
    sb.append("    fileKey: ").append(toIndentedString(fileKey)).append("\n");
    sb.append("    receiverLanguage: ").append(toIndentedString(receiverLanguage)).append("\n");
    sb.append("    textMessageRecipients: ").append(toIndentedString(textMessageRecipients)).append("\n");
    sb.append("    notifyCreator: ").append(toIndentedString(notifyCreator)).append("\n");
    sb.append("    creatorLanguage: ").append(toIndentedString(creatorLanguage)).append("\n");
    sb.append("    sendMail: ").append(toIndentedString(sendMail)).append("\n");
    sb.append("    mailRecipients: ").append(toIndentedString(mailRecipients)).append("\n");
    sb.append("    mailSubject: ").append(toIndentedString(mailSubject)).append("\n");
    sb.append("    mailBody: ").append(toIndentedString(mailBody)).append("\n");
    sb.append("    sendSms: ").append(toIndentedString(sendSms)).append("\n");
    sb.append("    smsRecipients: ").append(toIndentedString(smsRecipients)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
